﻿namespace maranov.SymlinkManager.FilesystemLinks
{
    /// <summary>
    /// Exception during link creation.
    /// </summary>
    public class LinkCreationException : LinkException
    {
        /// <summary>
        /// Default error code carried by the exception object if no other is specified.
        /// </summary>
        public const int DefaultErrorCode = 0;

        /// <summary>
        /// Exception during link creation.
        /// </summary>
        /// <param name="message">Exception message.</param>
        /// <param name="errorCode">Exception error code.</param>
        public LinkCreationException(string message, int errorCode = DefaultErrorCode) :
            base(message)
        {
            ErrorCode = errorCode;
        }

        /// <summary>
        /// Error code.
        /// </summary>
        public int ErrorCode
        {
            get;
            private set;
        }
    }
}
